package cn.cloudtogo.common.jwt;

import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.util.Map;

/**
 * @author yaolianhua789@gmail.com
 **/
public interface Jwt {

    String signHS256(JwtClaims jwtClaims, String secret);

    boolean verifyHS256(String token, String secret, Map<String, String> claims);

    JwtClaims decodeToken(String token);

    String signRS256(JwtClaims jwtClaims, RSAPublicKey publicKey, RSAPrivateKey privateKey);

    boolean verifyRS256(String token, RSAPublicKey publicKey, RSAPrivateKey privateKey, Map<String, String> claim);
}
